<!--编辑设计-->
<template>
    <div>
        <el-row>
            <el-col :span="18">
                <el-form :inline="true" :model="form" class="demo-form-inline">
                    <!--资质类别-->
                    <el-form-item label="资质类别">
                        <el-select v-model="formD.design_zizhi_type" placeholder="资质类别" size="">
                            <el-option :label="item.name" :value="item.id" v-for="item in LBMessage"></el-option>
                        </el-select>
                    </el-form-item>
                    <!--资质颁发单位-->
                    <el-form-item label="资质颁发单位">
                        <el-select v-model="formD.design_zizhi_award_unit">
                            <el-option :label="item.name" :value="item.id" v-for="item in BFMessage"></el-option>
                        </el-select>
                    </el-form-item>
                </el-form>
                <!--资质等级-->
                <el-form :inline="true" :model="form">
                    <el-form-item label="资质等级">
                        <el-select v-model="formD.design_zizhi_level">
                            <el-option :label="item.name" :value="item.id" v-for="item in DJMessage"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="收费标准">
                        <el-input v-model="formD.design_charge_standard" placeholder="收费标准"></el-input>
                    </el-form-item>
                    <el-form-item label="专业领域">
                        <el-input v-model="formD.design_major_field" placeholder="专业领域"></el-input>
                    </el-form-item>
                </el-form>
            </el-col>
            <el-col :span="1">
                <hr style="height:200px;width: 1px">
            </el-col>

            <el-col :span="5"><div >
                <h2>评价星级</h2>
                <el-form :inline="true" :model="formD" class="demo-form-inline">
                    <el-form-item>
                        <el-select v-model="formD.design_evaluate_star" placeholder="评价星级">
                            <el-option label="一星" value="1"></el-option>
                            <el-option label="二星" value="2"></el-option>
                            <el-option label="三星" value="3"></el-option>
                            <el-option label="四星" value="4"></el-option>
                            <el-option label="五星" value="5"></el-option>
                        </el-select>
                    </el-form-item>
                </el-form>
            </div></el-col>
        </el-row>
        <div style="width:100px;margin-left:80%">
            <el-button type="warning" @click="sendFormD">保存能力</el-button>
        </div>
    </div>
</template>
<script>
    import _http from '@/components/common/http.vue'
    import _param from '@/components/common/param.vue'
    import Bus from '@/config/bus.js';
    export default {
        data() {
            return {
                apiPort:{
//                    资质类别列表
                    aptitudeList:'MyProject/diction/getEnterpriseType',
//                    资质颁发单位列表
                    aptitudeawardList:'MyProject/diction/getEnterpriseType',
//                    资质等级列表
                    aptitudelevelList:'MyProject/diction/getEnterpriseType',


//
                },
                formD:{
                    design_zizhi_type:'',
                    design_zizhi_award_unit:'',
                    design_zizhi_level:'',
                    design_charge_standard:'',
                    design_major_field:'',
                    design_evaluate_star:''
                },
                form:{
//                    资质类别列表
                    aptitudeList:'diction/getEnterpriseType?code=designzzlb',
//                    资质颁发单位列表
                    aptitudeawardList:'diction/getEnterpriseType?code=design_zzbfdw',
//                    资质等级列表
                    aptitudelevelList:'diction/getEnterpriseType?code=design_zzdj',
                },
                LBMessage:'',
                BFMessage:'',
                DJMessage:''
            }
        },
        mounted(){
            Bus.$on('editAble',function(val){
                console.log('是否能保存')
                alert(val)
            })
            this.getDicdata()
        },
        methods:{
            sendFormD(){
                var that = this
                setTimeout(function(){
                    Bus.$emit("submitFormD",that.formD)
                    that.$message({
                        message: '保存成功',
                        type: 'success'
                    });
                },200)
            },
            getDicdata(){
                var that = this
                //      资质类别
                var paramCom={code:"designzzlb"}
                var paramsCom = that.querystring.stringify(paramCom)
                _http.axiosRequest(that,that.apiPort.aptitudeList,paramsCom,(res)=>{
                    that.LBMessage=res.data.data
            })
                //资质颁发单位
                var paramSh={code:"design_zzbfdw"}
                var paramsSh = that.querystring.stringify(paramSh)
                _http.axiosRequest(that,that.apiPort.aptitudeawardList,paramsSh,(res)=>{
                    that.BFMessage=res.data.data
            })
                //资质等级
                var paramSh={code:"design_zzdj"}
                var paramsSh = that.querystring.stringify(paramSh)
                _http.axiosRequest(that,that.apiPort.aptitudelevelList,paramsSh,(res)=>{
                    that.DJMessage=res.data.data
            })
            },
            openDialog(dialog){
                this.dialog[dialog].open = true
            },
            addCode() {
                var that = this;
            }
        },
    }
</script>